home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Agent Central Host Computer
/
Agent - Central Host Computer.iso
/
_SETUP.1
/
vsurvey.sql
< prev
next >
Wrap
Text File
|
2000-05-12
|
1KB
|
31 lines
/*
This view gathers the ridership survey information with run, route, trip data.
It utilizes the context method to access the data.
*/
create or replace view vsurvey as
select trunc(driver_context.rte_date) survey_day,
driver_context.route_id,
driver_context.run_id,
driver_context.trip_id,
operator_context.user_id,
fare_context.fare_context_id,
trips.direction1,
trips.direction2,
trips.dep_time,
trips.mileage,
trips.route_desc,
operator_context.farebox_glid,
bus_id,
fareentr.fare_id,
fareentr.conv_date
from fare_context, driver_context, operator_context, trips, bus, farebox, fareentr
where trips.id = driver_context.trip_id and
trips.runid = driver_context.run_id and
trips.routeid = driver_context.route_id and
fare_context.driver_context_id = driver_context.driver_context_id and driver_context.op_context_id = operator_context.op_context_id and
fare_context.fare_context_id = fareentr.fare_context_id(+) and
operator_context.farebox_glid = farebox.glid and
bus.glid = farebox.location;